<?php

namespace App\Livewire\Components;

use Livewire\Attributes\Url;
use App\Models\Article as ArticleModel;
use App\Models\Navigation as NavigationModels;
use Livewire\Component;

class Navigation extends Component
{
    public $keyword = '';

    public function search()
    {
        $this->redirect('/search/' . $this->keyword);
    }

    public function render()
    {

        $navigations = NavigationModels::query()->orderBy('sort')->get();
        return view('livewire.components.navigation', [
            'navigations' => $navigations
        ]);
    }
}
